﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Entities
{
    /// <summary>
    /// Represents alls information about personal message bettwen these User
    /// </summary>
    public class PersonalMessage
    {
        #region Variable Private
        private int _personalMessageId;
        private int _fromId;
        private int _toId;
        private string _subject;
        private DateTime _sentDate;
        private string _content;
        private bool _isRead;
        #endregion

        #region Properties Public
        public int PersonalMessageId
        {
            get { return _personalMessageId; }
            set { _personalMessageId = value; }
        }
        public int FromId
        {
            get { return _fromId; }
            set { _fromId = value; }
        }
        public int ToId
        {
            get { return _toId; }
            set { _toId = value; }
        }
        public string Subject
        {
            get { return _subject; }
            set { _subject = value; }
        }
        public DateTime SentDate
        {
            get { return _sentDate; }
            set { _sentDate = value; }
        }
        public string Content
        {
            get { return _content; }
            set { _content = value; }
        }
        public bool IsRead
        {
            get { return _isRead; }
            set { _isRead = value; }
        }
        #endregion

        #region Constructor
        public PersonalMessage() { }
        public PersonalMessage(int fromId, int toId, string subject, DateTime sentDate, string content, bool isRead)
        {
            this.FromId = fromId;
            this.ToId = toId;
            this.Subject = subject;
            this.SentDate = sentDate;
            this.Content = content;
            this.IsRead = isRead;
        }
        public PersonalMessage(int personalMesId, int fromId, int toId, string subject, DateTime sentDate, string content, bool isRead)
        {
            this.PersonalMessageId = personalMesId;
            this.FromId = fromId;
            this.ToId = toId;
            this.Subject = subject;
            this.SentDate = sentDate;
            this.Content = content;
            this.IsRead = isRead;
        }

        #endregion
    }
}
